﻿<%@ Page Language="C#" ValidateRequest="false" MasterPageFile="~/Include/Admin.master"
    AutoEventWireup="true" CodeFile="Add.aspx.cs" Inherits="Admin_HelpNava_Add" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <link type="text/css" href="/kindeditor/themes/default/default.css" />
    <script type="text/javascript" charset="utf-8" src="/kindeditor/kindeditor.js"></script>
    <script type="text/javascript" charset="utf-8" src="/kindeditor/lang/zh_CN.js"></script>
    <script type="text/javascript">
        var editor1;
        KindEditor.ready(function (K) {
            editor1 = K.create('#<%=txtNeiRong.ClientID %>', {
                width: '900px',
                resizeType: 1,
                cssPath: '/kindeditor/plugins/code/prettify.css',
                uploadJson: '/kindeditor/asp.net/upload_json.ashx',
                fileManagerJson: '/kindeditor/asp.net/file_manager_json.ashx',
                allowFileManager: true,
                filterMode: true,
                htmlTags: {
                    font: ['color', 'size', 'face', '.background-color'],
                    span: ['.color', '.background-color', '.font-size', '.font-family', '.background',
                                                            '.font-weight', '.font-style', '.text-decoration', '.vertical-align', '.line-height'
                                                            ],
                    div: [
                'align', '.border', '.margin', '.padding', '.text-align', '.color',
                '.background-color', '.font-size', '.font-family', '.font-weight', '.background',
                '.font-style', '.text-decoration', '.vertical-align', '.margin-left'
        ],
                    table: [
                'border', 'cellspacing', 'cellpadding', 'width', 'height', 'align', 'bordercolor',
                '.padding', '.margin', '.border', 'bgcolor', '.text-align', '.color', '.background-color',
                '.font-size', '.font-family', '.font-weight', '.font-style', '.text-decoration', '.background',
                '.width', '.height', '.border-collapse'
        ],
                    'td,th': [
                'align', 'valign', 'width', 'height', 'colspan', 'rowspan', 'bgcolor',
                '.text-align', '.color', '.background-color', '.font-size', '.font-family', '.font-weight',
                '.font-style', '.text-decoration', '.vertical-align', '.background', '.border'
        ],
                    a: ['href', 'target', 'name'],
                    embed: ['src', 'width', 'height', 'type', 'loop', 'autostart', 'quality', '.width', '.height', 'align', 'allowscriptaccess'],
                    img: ['src', 'width', 'height', 'border', 'alt', 'title', 'align', '.width', '.height', '.border'],
                    'p,ol,ul,li,blockquote,h1,h2,h3,h4,h5,h6': [
                'align', '.text-align', '.color', '.background-color', '.font-size', '.font-family', '.background',
                '.font-weight', '.font-style', '.text-decoration', '.vertical-align', '.text-indent', '.margin-left'
        ],
                    pre: ['class'],
                    hr: ['class', '.page-break-after'],
                    'br,tbody,tr,strong,b,sub,sup,em,i,u,strike,s,del': []
                },
                urlType: 'relative',
                pasteType: 1,
                items: ['fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline', 'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist', 'insertunorderedlist', '|', 'emoticons', 'image', 'link', '|', 'wordpaste', '|', 'selectall', 'justifyleft', 'justifycenter', 'justifyright', 'justifyfull', '|', 'quickformat', '|', 'map'],
                afterCreate: function () {

                }

            });

        });
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div style="text-align: center">
        <table cellspacing="0" cellpadding="0" style="width: 100%; height: 30px; padding-bottom: 5px;
            border: 1px; border-color: #66CCFF;">
            <tr style="background-image: url('/images/管理员页面/title_bg1.jpg'); background-repeat: repeat-x;">
                <td style="font-weight: bold; font-size: large; font-family: 仿宋;">
                    <strong class="style1">帮助中心添加/修改</strong>
                </td>
            </tr>
        </table>
        <h4 style="text-align: left">
            <a href="Manage.aspx">返回管理页面</a>
        </h4>
        <table style="width: 100%; margin-bottom: 0px;" class="editTable" cellspacing="1px">
            <tr>
                <th class="style3">
                    <span class="red">*</span>标题
                </th>
                <td>
                    <asp:TextBox ID="txtBiaoTi" runat="server" Height="22px" Width="200px" MaxLength="10"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="*"
                        ControlToValidate="txtBiaoTi"></asp:RequiredFieldValidator>
                </td>
                <th class="style3">
                    帮助导航
                </th>
                <td>
                    <asp:DropDownList ID="drpHelpNav" runat="server" Height="22px" Width="200px">
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <th class="style3">
                    <span class="red">*</span>内容
                </th>
                <td class="style5" colspan="3">
                    <asp:TextBox ID="txtNeiRong" runat="server" Height="200px" Width="700px"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="*"
                        ControlToValidate="txtNeiRong"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td colspan="4">
                    <input id="sumbit" type="button" value="提交" />
                    <asp:Button ID="btnSubmit" runat="server" Style="display: none" Text="提交" Height="20px"
                        Width="50px" OnClick="btnSubmit_Click" /><asp:Literal ID="litMessage" runat="server"></asp:Literal>
                </td>
            </tr>
        </table>
    </div>
    <script type="text/javascript">
        $(document).ready(function () {
            $("#sumbit").click(function () {
                if (editor1.isEmpty()) {
                    alert("发送内容不能为空");
                    return;
                }
                editor1.sync('editor_id');
                $("#<%=btnSubmit.ClientID %>").click();
            })
        })     
    </script>
</asp:Content>
